package com.yh.modules.data.entity;

import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author: skh
 * @Date: 2020/3/26 14:17
 * @Description:
 */
@Data
@TableName("tb_machine_daily_info")
public class MachineDailyInfoEntity {

    @Id
    private Integer id;

    @NotNull(message = "机器id不能为空")
    private Integer machineId;

    @NotBlank(message = "零件名称不能为空")
    private String partName;

    @NotNull(message = "数据上传的时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @NotNull(message = "新增数")
    private Integer count;
}
